package sparrowGui.components.item
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	import sparrowGui.i.RichItemImpl;
	
	/**
	 * 富按钮,除了基本的鼠标四态外，还添了选中和不可选状态
	 * @author Pelephone
	 * @website http://cnblogs.com/pelephone
	 */
	public class RichMCBtn extends SRichItem implements RichItemImpl
	{
		public function RichMCBtn(argSkin:MovieClip)
		{
			super(argSkin);
		}
		
		override protected function setUI(uiVars:Object=null):void
		{
			var mc:MovieClip = null;//argSkin as MovieClip;
			if(!mc || mc.totalFrames<2) new Error("组件皮肤帧数错误!");
			super.setUI(mc);
			mc.gotoAndStop(UPSTATE_NAME);
		}
		
		override protected function changeState(clipName:String):void
		{
			skinMC.gotoAndStop(clipName);
		}
		
		override protected function hiddenState():void
		{
		}
		
		public function get skinMC():MovieClip 
		{
			return skin as MovieClip;
		}
	}
}